import pygame
import sys
from pygame.locals import *
import image
from const import *


pygame.init()


DS = pygame.display.set_mode((1280,600))
img = image.Image(PATH_BACK,0,(0,0),(1280,600),0)
img1 = image.Image('pic/zombie/0/%d.png',0,(1280,200),(100,128),15)
while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
    DS.fill((255,255,255))
    img.draw(DS)
    img1.doLeft()
    img1.draw(DS)
    img1.updateIndex((img1.pathIndex + 1) % 15)
    pygame.display.update()